package com.zhaogang.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.zhaogang.dao.SaleBabyAccountAndSaleAccountMapper;
import com.zhaogang.dto.SaleBabyAccountAndSaleAccount;
import com.zhaogang.service.SaleBabyAccountAndSaleAccountService;

@Service
public class SaleBabyAccountAndSaleAccountServiceImpl implements SaleBabyAccountAndSaleAccountService{
@Resource
private SaleBabyAccountAndSaleAccountMapper saleAccountMapper11;

	public List<SaleBabyAccountAndSaleAccount> queryBaby(String saleAccount) {
		// TODO Auto-generated method stub
		List<SaleBabyAccountAndSaleAccount> babyAccountAndSaleAccounts=saleAccountMapper11.babySelectQuery(saleAccount);
		return babyAccountAndSaleAccounts;
	}

	public List<SaleBabyAccountAndSaleAccount> insertBabyAccount(String saleAccount) {
		// TODO Auto-generated method stub
		 return insertBabyAccount(saleAccount);
	}
	/*
	 * (non-Javadoc)
	 * @see com.zhaogang.service.SaleBabyAccountAndSaleAccountService#insertBabyAccount(com.zhaogang.dto.SaleBabyAccountAndSaleAccount)
	 * 新增数据
	 */
	public int insertBabyAccount(SaleBabyAccountAndSaleAccount saleAccount) {
		// TODO Auto-generated method stub
		return saleAccountMapper11.insertBabyAccount(saleAccount);
	}

	public int updateBabyAccount(SaleBabyAccountAndSaleAccount babyAccountAndSaleAccount) {
		// TODO Auto-generated method stub
		return saleAccountMapper11.insertAndUpdate(babyAccountAndSaleAccount);
	}
	/*
	 * (non-Javadoc)
	 * @see com.zhaogang.service.SaleBabyAccountAndSaleAccountService#selectById(java.lang.Integer)
	 * 修改时回显示
	 */
	public SaleBabyAccountAndSaleAccount selectById(Integer babyId) {
		// TODO Auto-generated method stub
		SaleBabyAccountAndSaleAccount saleAccount=saleAccountMapper11.queryObject(babyId);
		return saleAccount;
	}
}
